home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: String Question
- Date: Sun, 17 Mar 96 16:50:09 GMT
- Organization: none
- Message-ID: <827081409snz@genesis.demon.co.uk>
- References: <DoBt0E.4A9@freenet.carleton.ca> <4ievgg$qcg@garden.csc.calpoly.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4ievgg$qcg@garden.csc.calpoly.edu>
- dstubbs@garden.csc.calpoly.edu "Dan Stubbs" writes:
-
- >In article <DoBt0E.4A9@freenet.carleton.ca>,
- >Jerry Boyd <aq436@FreeNet.Carleton.CA> wrote:
- >>
- >>
- >>How would I write a function to remove a specified
- >>number of characters from a string and store it in an array.
- >>For instance, extracting three characters from a string, starting
- >>from the 5th character.
-
- What is supposed to happen if the source string is less than 8 characters
- long or is this guaranteed not to occur? Is the source string to be left
- untouched (i.e. the substring just copied) or is it to be closed i.e. the
- substring to be really removed (the question indicates this but there
- is some room for doubt). The first step to solve a problem is to specify it
- fully.
-
- >>
- >>
- >
- >void remove (char A[], char B[], int p, int q, int n) {
-
- It is probably best not to try to redefine a standard library function! :-)
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-